{% extends "baseMenu.html" %}

{% block content %}
        <div class="sombraTabla" align="center">
	        <table><tbody>
            	<tr style="color: black;" align="center"><td style="height: 100%; width: 100%;">
            		<form name="Userform" action="" method="post">{% csrf_token %}
            			<p>Cambiar contraseña de usuario {{ user }}</p>
            			<div class="form-row">{{ form.nombre }}</div>
                       	<div class="form-row"><label for="id_oldPassword" class="required">Vieja contraseña:</label> {{ form.oldPassword }}</div>
						<div class="form-row"><label for="id_newPassword" class="required">Nueva contraseña:</label> {{ form.newPassword }}</div>
						<div class="form-row"><label for="id_confirmacion" class="required">Repetir contraseña:</label> {{ form.confirmacion }}</div>
						<div class="submit-row">
						  	<input type="button" name="back" id="back" value="Volver" onClick="javaScript:history.back();">
							<input type="submit" name="changePassword" value="changePassword" />
						</div>
					</form>
				</td></tr>
				{% if error %} <tr><td style="text-align: center;"><font color="red" size=2>Error: {{ error }}</font></td></tr>{% endif %}
	      	</tbody></table>
			<script type="text/javascript">document.getElementById("id_oldPassword").focus();</script>
		</div>
{% endblock %}
